﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Agile.Manager.Util;

namespace Agile.Manager.Windows.Model
{
    [AttributeElementType(ElementType.DataElement)]
    public class Task
    {
        public Task()
        {
            if (Subtasks == null)
                Subtasks = new List<Task>();

            ID = Guid.NewGuid().ToString();
        }

        public Task(string _ID)
        {
            if (Subtasks == null)
                Subtasks = new List<Task>();

            ID = _ID;
        }

        [AttributeElementType(ElementType.DataField)]
        public String ID { get; set; }

        [AttributeElementType(ElementType.DataField)]
        public String Name { get; set; }

        [AttributeElementType(ElementType.DataField)]
        public String TaskID { get; set; }

        [AttributeElementType(ElementType.DataField)]
        public String Resources { get; set; }

        [AttributeElementType(ElementType.DataField)]
        public String Duration { get; set; }

        [AttributeElementType(ElementType.DataField)]
        public String Progress { get; set; }

        [AttributeElementType(ElementType.DataField)]
        public String Responsible { get; set; }

        public List<Task> Subtasks { get; set; }
    }
}
